#include "gfx/legato/generated/le_gen_assets.h"

/*****************************************************************************
 * Legato String Table
 * Encoding        ASCII
 * Language Count: 1
 * String Count:   2
 *****************************************************************************/

/*****************************************************************************
 * string table data
 * 
 * this table contains the raw character data for each string
 * 
 * unsigned short - number of indices in the table
 * unsigned short - number of languages in the table
 * 
 * index array (size = number of indices * number of languages
 * 
 * for each index in the array:
 *   unsigned byte - the font ID for the index
 *   unsigned byte[3] - the offset of the string codepoint data in
 *                      the table
 * 
 * string data is found by jumping to the index offset from the start
 * of the table
 * 
 * string data entry:
 *     unsigned short - length of the string in bytes (encoding dependent)
 *     codepoint data - the string data
 ****************************************************************************/

const uint8_t stringTable_data[36] =
{
    0x02,0x00,0x01,0x00,0x00,0x0C,0x00,0x00,0x00,0x16,0x00,0x00,0x07,0x00,0x42,0x75,
    0x74,0x74,0x6F,0x6E,0x31,0x00,0x0B,0x00,0x4C,0x45,0x44,0x20,0x20,0x4F,0x4E,0x2F,
    0x4F,0x46,0x46,0x00,
};

/* font asset pointer list */
leFont* fontList[1] =
{
    (leFont*)&Bold_24,
};

const leStringTable stringTable =
{
    {
        LE_STREAM_LOCATION_ID_INTERNAL, // data location id
        (void*)stringTable_data, // data address pointer
        36, // data size
    },
    (void*)stringTable_data, // string table data
    fontList, // font lookup table
    LE_STRING_ENCODING_ASCII // encoding standard
};


// string list
leTableString string_Button1;
leTableString string_LED_On_Off;

void initializeStrings(void)
{
    leTableString_Constructor(&string_Button1, stringID_Button1);
    leTableString_Constructor(&string_LED_On_Off, stringID_LED_On_Off);
}
